#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
const int maxn = 1e3+10;
int c[maxn];
int main()
{
	int t;
	scanf("%d",&t);
	while(t--)
	{
		int n;
		scanf("%d",&n);
		for(int i = 0;i<n;i++)
		{
			scanf("%d",&c[i]);
		}
		int a = 0;
		int b = 0;
		int a1 = 0;
		int b1 = 0;
		int cnt = 1;
		int i,j;
		for(i = 0,j = n-1;i<=j;cnt++)
		{
			
			if(cnt%2)
			{
				do
				{
					a1 += c[i];
					i++; 
					if(i>j) break;
				}while(a1<=b1);
				//printf("****%d\n",a1);
				b1 = 0;
				a += a1;
			}
			else 
			{
				do
				{
					b1 += c[j];
					j--; 
					if(i>j) break;
				}while(b1<=a1);
				//printf("+++++++%d\n",b1);
				a1 = 0;
				b += b1;
			}
		}
		printf("%d %d %d\n",cnt-1,a,b);
	}
} 
